﻿@model AesApplication.Models.Application

@{
    ViewBag.Title = "Application";
}

<h2>Application ID @Model.ID for @Model.Job.Title at @Model.Job.Department.Store.Name (@Model.Job.Department.Name)</h2>

<h3>Status:</h3>
<p>@Model.Status</p>

<h3>First name:</h3>
<p>@Model.FirstName</p>

<h3>Last name:</h3>
<p>@Model.LastName</p>

<h3>Birth date:</h3>
<p>@Model.BirthDate.ToShortDateString()</p>

<h3>Address:</h3>
<p>@Model.Address</p>

<h3>City:</h3>
<p>@Model.City</p>

<h3>State:</h3>
<p>@Model.State</p>

<h3>Zip:</h3>
<p>@Model.Zip</p>

<h3>Work history:</h3>
<p>@Model.WorkHistory</p>

<h3>Education:</h3>
<p>@Model.Education</p>

<h3>Questionnaire answers:</h3>
@if (Model.Answers.Count > 0)
{
    foreach (AesApplication.Models.Answer answer in Model.Answers.OrderBy(c => c.Question.Number))
    {
        <h4>@answer.Question.Number. @answer.Question.Text</h4>
        <p>@answer.Text</p>
    }
}
else
{
    <p><i>No questionnaire answers</i></p>
}
<form action="/HiringSpecialist/UpdateApplication" method="post">
    <h3>Hiring Specialist:</h3>
    @Html.Hidden("specialist", WebSecurity.CurrentUserName)
    @if(@Model.HiringSpecialist == null)
    {
        <br />
        <text>n/a</text>
        <br />
        <br />
    }
    else
    {
        <br />
        <text>@Model.HiringSpecialist</text>
        <br />
        <br />
    }



    <h3>Hiring Specialists Comments:</h3>
        @Html.Hidden("id", @Model.ID)
        <textarea name="comment" id="comment" cols="40" rows="5">@Model.HiringSpecialistComment</textarea>
        <br />
        <br />
        <input type="submit" name="submit" id="approve" value="approve" />
        <input type="submit" name="submit" id="discard" value="discard" />
        <input type="submit" name="submit" id="save" value="save" />
        <input type="submit" name="submit" id="back" value="back" />
    </form>
